**Rendering Algorithms FA24 Final Project**

Taiyuan Zhang (f006y0t)

(#) 1. Introduction (##) 1.1 Motivational images (Recursive reflection / Infinite mirror) ![cite: movie "Inception"](motivational_images/Snipaste_2024-10-27_20-32-15.png) ![cite: https://wallhaven.cc/w/01gye9](motivational_images/wallhaven-01gye9.jpg) Inspired by the project theme "Reflections on Time," I aim to create a scene that embodies both "reflections" and "time." Recursive reflections are an ideal choice to represent these concepts. By incorporating aligned mirrors, this phenomenon creates a surreal atmosphere, evoking the sense of an infinite series of frames within frames, each containing similar elements and reflecting the essence of "time." My focus is on accurately capturing this captivating effect and presenting it as a clear, visually striking rendered image. (##) 1.2 Proposed features and points * Simple * (2 points) Parellization with Nanothread/C++17 Execution Policy/OpenMP * Moderate * (3 points) Intel's Open Image Denoise integration * (4 points) Environment Map Emitter (with importance sampling) * Advanced * (10 points) Bidirectional Path Tracing Total 23 (larger than 16 in case some features are not implemented) (#) 2. Simple features (##) 2.1 Parallization with Nanothread Device: Intel Core i7-12700H Pool size: 20 Average improvement: 6x
Test Scene Name Sample Numbers Rendering Time (Without Parallelization) Rendering Time (Parallelized with Nanothread) Improvement
simple-geometry 64 37.920s 7.046s 5.4x
buddha-box 64 9m:21s 1m:16s 7.4x
leaderboard 16 17.120s 4.869s 3.5x
sponza-buddha 1 1m:56s 14.286s 8x
blinn-phong 100 1m:13s 13.685s 5.3x
jenson-box-mis 100 2m:49s 27.440s 6.2x
(#) 3. Moderate features (##) 3.1 Intel's Open Image Denoise integration I downloaded precompiled binaries from the official website and integrated them into my project. Experimental results show that the denoiser can effectively reduce noise in the rendered images. Following are the comparison images before and after denoising, and with or without specific passes. - The albedo image is the feature image that usually provides the biggest quality improvement. It contains the approximate color of the surfaces independent of illumination and viewing angle. - The normal image should contain the shading normals of the surfaces either in world-space or view-space. We can include normal maps to preserve as much detail as possible. constant-cornell-box:
Before After
Only color pass Without abledo pass Without normal pass Full passes
buddha-box:
Before After
Only color pass Without abledo pass Without normal pass Full passes
(##) 3.2 Environment Map Emitter I implemented an environment map emitter with importance sampling. The environment map is a 2D texture that represents the environment surrounding the scene. The environment map emitter is a light source that emits light based on the environment map. The importance sampling technique is used to sample the environment map efficiently, which improves the rendering quality and performance. (1) Change the parser.cpp to indentify the environment map emitter (background type: envmap). (2) Implement the pdf computation, which is initialized when load the exr file. - store the pdf of each pixel in the environment map - store the marginal distribution and conditional distribution, and nomalize pdf_envmap. (3) Implement the importance sampling with precomputed pdf. (4) Update the rendering equation to consider the environment map emitter.
Environment map 1 Environment map 2 Environment map 3 Environment map 4
(#) 4. Advanced features (##) 4.1 Bidirectional Path Tracing I implemented bidirectional path tracing to improve the rendering quality of the scene. Bidirectional path tracing is a rendering algorithm that combines the advantages of path tracing and light tracing. As I want to emphasize the recursive reflections in the scene, bidirectional path tracing is an ideal choice to capture the complex light paths accurately. Following the references: - Veach, Eric. "Robust Monte Carlo Methods for Light Transport Simulation." Ph.D. Thesis, Stanford University, 1997. - Georgiev I. Implementing vertex connection and merging[J]. Technical Re-port. Saarland University, 2012. - https://www.mitsuba-renderer.org/releases/current/documentation.pdf - https://github.com/pzheng460/BidirectionalPathTracing (1) Implement the bidirectional path tracing algorithm. - Generate light paths from the light source. - Generate eye paths from the camera. - Connect the light paths and eye paths to form a complete path. - Evaluate the path radiance using the path tracing equation. (2) Update the rendering equation to consider the bidirectional path tracing algorithm. However, due to the complexity of the algorithm and the limited time, I leave these features for future work: - Implement multiple importance sampling to combine path tracing and light tracing. - Implement shadow rays to handle occlusion between light paths and eye paths. And the experimental results show that bidirectional path tracing can effectively reduce noise and improve the rendering quality of the scene. Mirror is considered as Metal material with roughness 0.001 since the MIS is not implemented.
Path tracing-spp100 Bidirectional path tracing-spp100
(#) 5. Conclusion and Final Scene In this final project, I implement one simple feature - Parallization with Nanothread (2 points), two moderate features - Intel's Open Image Denoise (3 points) and Environment Map Emitter (with importance sampling) (4 points), and one advance feature - Bidirectional Path Tracing (10 points). The total score is 19 points, which is larger than 16 points. To build my final scene, I want to leverage recursive reflection to express the "change in time". The Wright Brothers invented the world's first successful airplane Wright Flyer on December 17, 1903. Over the last century, the shape of the airplane has undergone many changes. In my secne, thanks to the recursive reflection, it looks like a Time Tunnel that the Wright Flyer flies into the tunnel and the modern plane flies out. Therefore, I feel like it's a great consistency with the theme "Reflection on time" with "transition" from Wright Flyer into modern plane. This is the blender result with spp120 and max_bounce128: rendered by Blender My final result with spp120 and max_bounce128 using 38 mins: Mine